package com.zhihuishu.micro.course.openapi.myuni;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.zhihuishu.micro.course.openapi.myuni.dto.CourseOpenDto;
import com.zhihuishu.micro.course.openapi.myuni.dto.CourseStatusEnum;
import com.zhihuishu.micro.course.openapi.myuni.dto.CourseTypeEnum;
import com.zhihuishu.micro.course.openapi.myuni.dto.CourseWebDto;
import com.zhihuishu.micro.course.openapi.myuni.dto.PageBean;
import com.zhihuishu.micro.course.openapi.myuni.dto.ScoreAssessRuleInterfaceDto;
import com.zhihuishu.micro.course.openapi.myuni.dto.CourseCategoryOpenDto;
import com.zhihuishu.remote.RemoteException;
import com.zhihuishu.remote.RemoteResult;

public interface CourseOpenService {

    /**
     * 创建课程，返回学堂课程ID
     * 
     * @param myuniCourseId
     * @param name
     * @param createUser
     * @return
     * @throws RemoteException
     */
    RemoteResult<Integer> create(int myuniCourseId ,String name, long createUser, CourseTypeEnum courseTypeEnum)
            throws RemoteException;

    /**
     * 更新课程信息
     * 
     * @param course
     * @param updateUser
     * @return
     * @throws RemoteException
     */
    RemoteResult<Void> update(CourseWebDto course, long updateUser) throws RemoteException;

    /**
     * 
     * @Title:
     * @Description: myuni更新课程
     * @param @param courseOpenDto
     * @param @return
     * @return RemoteResult<Void>
     * @author jipeng
     * @throws
     */
    RemoteResult<Void> update(CourseOpenDto courseOpenDto, long updateUser);

    /**
     * 查询课程运行模式
     * 
     * @param onlineCourseId
     * @return
     * @throws RemoteException
     */
    RemoteResult<Integer> queryCourseMode(long onlineCourseId) throws RemoteException;

    /**
     * 查询课程考试时间
     * 
     * @param onlineCourseId 课程id
     * @param courseStartTime 课程运行开始时间
     * @return
     * @throws RemoteException
     */
    @Deprecated
    RemoteResult<Map<String, String>> queryExamTime(long onlineCourseId, Date courseStartTime)
            throws RemoteException;

    /**
     * 查询考核标准（在线成绩满分、见面课成绩满分、期末考试成绩满分、论坛成绩满分）
     * 
     * @param onlineCoureseId
     * @return
     * @throws RemoteException
     */
    RemoteResult<ScoreAssessRuleInterfaceDto> queryScoreAssessRule(long onlineCourseId)
            throws RemoteException;

    /**
     * 更新课程状态（state:null建设中。0:待审核，1：通过审核，2：不通过）
     * 
     * @param course
     * @param updateUser
     * @return
     * @throws RemoteException
     */
    RemoteResult<Void> updateCourseState(long courseId, Integer state, long userId) throws RemoteException;

    /**
     * 根据课程id删除课程信息
     * 
     * @param courseId
     * @param userId
     * @return
     */
    RemoteResult<Void> deleteCourese(long courseId, long userId);

    /**
     * 根据条件查询课程数量
     * 
     * @param name
     * @param courseTypeEnum
     * @param courseStatusEnum
     * @return
     */
    RemoteResult<Integer> queryCourseCount(Integer schoolId, String name, CourseTypeEnum courseTypeEnum,
            CourseStatusEnum courseStatusEnum);

    /**
     * 根据课程id集合查询课程分类
     * 
     * @param courseIds
     * @return
     */
    RemoteResult<List<CourseCategoryOpenDto>> queryCourseCategoryByCourseIds(List<Long> courseIds);

    /**
     * 
     * @Title:
     * @Description: 根据课程ids查询课程信息
     * @param @param courseIds
     * @param @return
     * @return RemoteResult<List<CourseOpenDto>>
     * @author jipeng
     * @throws
     */
    RemoteResult<List<CourseOpenDto>> queryCourseInfoByCourseIds(Long... courseIds);

    /**
     * 
     * @Title:
     * @Description: 根据条件查询列表
     * @param @param courseOpenDto
     * @param @return
     * @return RemoteResult<List<CourseOpenDto>>
     * @author jipeng
     * @throws
     */
    RemoteResult<List<CourseOpenDto>> queryCourseInfoByCond(Integer schoolId, String name,
            CourseTypeEnum courseTypeEnum, CourseStatusEnum courseStatusEnum, PageBean pageBean);

    /**
     * 根据课程ID得到课程需要的天数
     * 
     * @author ztl
     * @date 2016年4月18日13:57:36
     * @param courseId
     * @return
     * @throws RemoteException
     */
    RemoteResult<Integer> queryCourseLimitDay(long courseId);
}
